package com.xbongbong.pro.log.pojo.dto;

import com.xbongbong.paas.domain.entity.PaasFormDataEntity;
import com.xbongbong.paas.domain.entity.ext.PaasFormDataEntityExt;
import com.xbongbong.paas.pojo.AttrValuePojo;
import com.xbongbong.saas.domain.entity.ext.CustomerEntityExt;
import com.xbongbong.saas.enums.OperateModuleTypeEnum;
import com.xbongbong.saas.enums.OperateTypeEnum;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import java.util.List;
import java.util.Map;

/**
 * @author: yingjianfeng
 * @date: 2022/4/14 09:58
 * @description:
 */
@Getter
@Setter
@ToString
public class UpdateBatchOperationLogDTO {
    /**
     * 公司ID
     */
    private String corpid;
    /**
     *操作人ID
     */
    private String opUserId;
    /**
     *操作人姓名
     */
    private String opUserName;
    /**
     *操作模块枚举，用于日志记录
    private OperateModuleTypeEnum operateModuleType;
     */
    /**
     *操作类型枚举，用于日志记录
    private OperateTypeEnum operateType;
     */
    /**
     *所属对象ID
    private String opObjectId;
     */
    /**
     *操作对象名称
    private String opObjectName;
     */
    /**
     *备注
    private String memo;
     */
    /**
     * 更新的数据条数
     */
    private Integer allowUpdateDataSize;
    /**
     * httpHeader
     */
    private String httpHeader;
    /**
     * 日志记录更改之后的值
    private String logValue;
     */
    /**
     * 日志记录更改的字段名称
    private String logAttrName;
     */
    /**
     * 更新的字段
    private String attr;
     */

    /**
     *  日志记录更改之后的 attr、logAttrName、logValue
     */
    private List<AttrValuePojo> logAVList;

    private List<PaasFormDataEntity> newDataList;
    private List<PaasFormDataEntity> oldDataList;

    /**
     * 表单id
     */
    private Long formId;
    /**
     * 业务类型
     * @see com.xbongbong.saas.enums.XbbRefTypeEnum
     */
    private Integer businessType;
    /**
     * 是否是批量操作 0 不是  1 是
     */
    private Integer isBatch;

    public UpdateBatchOperationLogDTO( ) {

    }

    public UpdateBatchOperationLogDTO(String corpid, String opUserId, String opUserName, Integer allowUpdateDataSize, String httpHeader, List<AttrValuePojo> logAVList, List<PaasFormDataEntity> newDataList, List<PaasFormDataEntity> oldDataList, Long formId, Integer businessType, Integer isBatch) {
        this.corpid = corpid;
        this.opUserId = opUserId;
        this.opUserName = opUserName;
        this.allowUpdateDataSize = allowUpdateDataSize;
        this.httpHeader = httpHeader;
        this.logAVList = logAVList;
        this.newDataList = newDataList;
        this.oldDataList = oldDataList;
        this.formId = formId;
        this.businessType = businessType;
        this.isBatch = isBatch;
    }
}
